home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / compiler / __init__.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  1.2 KB  |  32 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Package for parsing and compiling Python source code
  5.  
  6. There are several functions defined at the top level that are imported
  7. from modules contained in the package.
  8.  
  9. parse(buf, mode="exec") -> AST
  10.     Converts a string containing Python source code to an abstract
  11.     syntax tree (AST).  The AST is defined in compiler.ast.
  12.  
  13. parseFile(path) -> AST
  14.     The same as parse(open(path))
  15.  
  16. walk(ast, visitor, verbose=None)
  17.     Does a pre-order walk over the ast using the visitor instance.
  18.     See compiler.visitor for details.
  19.  
  20. compile(source, filename, mode, flags=None, dont_inherit=None)
  21.     Returns a code object.  A replacement for the builtin compile() function.
  22.  
  23. compileFile(filename)
  24.     Generates a .pyc file by compiling filename.
  25. '''
  26. from warnings import warnpy3k
  27. warnpy3k('the compiler package has been removed in Python 3.0', stacklevel = 2)
  28. del warnpy3k
  29. from compiler.transformer import parse, parseFile
  30. from compiler.visitor import walk
  31. from compiler.pycodegen import compile, compileFile
  32.